package com.esd.crm.service.impl;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.esd.crm.entity.Customer;
import com.esd.crm.mapper.CustomerMapper;
import com.esd.crm.service.CustomerService;

@Service
public class CustomerServiceImpl implements CustomerService {

	@Autowired
	private CustomerMapper mapper;

	@Override
	public int deleteByPrimaryKey(Integer id) {
		return mapper.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(Customer record) {
		return mapper.insert(record);
	}

	@Override
	public int insertSelective(Customer record) {
		return mapper.insertSelective(record);
	}

	@Override
	public Customer selectByPrimaryKey(Integer id) {
		return mapper.selectByPrimaryKey(id);
	}

	@Override
	public int updateByPrimaryKeySelective(Customer record) {
		return mapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(Customer record) {
		return mapper.updateByPrimaryKey(record);
	}

	@Override
	public List<Customer> selectByName(String name, int page, int totle) {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("name", name);
		map.put("page", page);
		map.put("totle", totle);
		// return mapper.selectByName(map);
		return null;
	}

	@Override
	public int selectByNameCount(String name) {
		// return mapper.selectByNameCount(name);
		return 0;
	}

	@Override
	public List<Customer> selectByNumber(String number, int page, int totle) {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("number", number);
		map.put("page", page);
		map.put("totle", totle);
		// return mapper.selectByNumber(map);
		return null;
	}

	@Override
	public int selectByNumberCount(String number) {
		// return mapper.selectByNumberCount(number);
		return 0;
	}

	@Override
	public List<Customer> selectByParam(Map<String, Object> param) {
		return mapper.selectByParam(param);

	}

	@Override
	public int selectByParamCount(Map<String, Object> param) {
		return mapper.selectByParamCount(param);
	}

}
